package com.ctshk.rpc.hotel.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.hotel.dto.HotelProductCostDateDTO;
import com.ctshk.rpc.hotel.entity.HotelProductCostDate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 酒店产品成本日期 Mapper 接口
 * </p>
 *
 * @author yinhuan
 * @since 2021-03-03
 */
public interface HotelProductCostDateMapper extends BaseMapper<HotelProductCostDate> {
    /**
     * 根据产品成本id查询产品成本时间集合
     * @param busProductCostId
     * @return
     */
    @Select("<script>"+"select id,cost_id,date_begin,date_end from t_hotel_product_cost_date \n" +
            "where cost_id = #{hotelProductCostId} \n" +
            "</script>")
    List<HotelProductCostDateDTO> queryList(@Param("hotelProductCostId") Long busProductCostId);
}